//
//  Common.swift
//  XJWeiBO
//
//  Created by 452608533 on 16/7/20.
//  Copyright © 2016年 452608533. All rights reserved.
//

import UIKit
//切换跟控制器的通知
let WBSwitchRootViewControllerNoti = "WBSwitchRootViewControllerNoti"
let wbName = "17755652713"
let wbPassword = "TYL@452608533"

let APPKEY = "123562660"
let APPSECRET = "9860d8c4d4fb5eac98c9f511e61a8b81"
let APPREDIRECT_URI = "http://www.baidu.com"

let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height

func RGB(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat = 1) -> UIColor{
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: alpha)
}

func RandomColor() ->UIColor{
    let r = random()%256
    let g = random()%256
    let b = random()%256
    return RGB(CGFloat(r), green: CGFloat(g), blue: CGFloat(b))
}